package com.kaifamiao.thread.d0926;

public class Demo06 {

    public static void main(String[] args) {
        Thread t = new Thread("一号线程"){
            @Override
            public void run(){
                Thread.yield();
                for (int i = 0; i < 50; i++) {
                    System.out.println(Thread.currentThread().getName()+" "+i);
                }
            }
        };
        Thread t1 = new Thread("二号线程"){
            @Override
            public void run(){
                for (int i = 0; i < 50; i++) {
                    System.out.println(Thread.currentThread().getName()+" "+i);
                }
            }
        };

        t.start();
        t1.start();

    }
}
